#include <stdio.h>
#include "Symbol.h"

class Coff {
private:
	Symbol **symTable;	// Dinamic allocated symbol table
	CoffHeader* header;	// header readed from file

	FILE *fp;
    int itptr;          // iterator pointer
	GlobalSymIterator*  gSymIterator;

public:
	//Class Contructor
		Coff(const char *filename); // TODO: open file and read header
		~Coff();					// TODO: close file

	//General Methods
		bool error()				{ return fp==NULL; }
		int numOfSections()			{ return header->nSections; }
		void loadSymbols();			
		Symbol** getSymbols()       { return symTable; }

	//Iterator Methods
		SymIterator * SymIterator();// TODO

	//accessor/mutator methods
		Symbol * getSymbol(int num)	{ return symTable[num]; }
		CoffHeader* getHeader(){ return header; }
		FILE * getFile(){ return fp; }
};
